<template>
	<view>
		<button type="primary" @click="add">存储缓存</button>
	</view>
</template>

<script>
	// import {http} from "../../utils/http.js";
	
	export default {
		data() {
			return {
				
			}
		},
		async onLoad(){
			//发送网络请求
			// let result =await this.$http({url:"/api/list",data:{id:1001}}).catch(err=>{
			// 	console.error(err)
			// })
			// console.log(result)
			
			if(process.env.NODE_ENV === 'development'){
			    console.log('开发环境')
			}else{
			    console.log('生产环境')
			}
		},
		methods: {
			add(){
				uni.setStorageSync("name","张三")
			}
			
		}
	}
</script>

<style>

</style>
